package com.spring.shops.model.result;

import com.spring.shops.model.vo.SysLogVo;
import lombok.Data;

@Data
public class SysLogResult {
    private String code=null;
    private String msg=null;
    private Object data;
    private String version="";
    private Integer timestamp=null;
    private String sign=null;
    private boolean success=true;
    private boolean fail=true;

    public static  SysLogResult success(SysLogVo sysLogVo){
        SysLogResult sysLogResult = new SysLogResult();
        SysLogVo sysLogVo1 = new SysLogVo();
        sysLogVo1.setRecords(sysLogVo.getRecords());
        sysLogVo1.setTotal(sysLogVo.getTotal());
        sysLogVo1.setSize(sysLogVo.getSize());
        sysLogVo1.setCurrent(sysLogVo.getCurrent());
        sysLogResult.setData(sysLogVo1);
        sysLogResult.setFail(false);
        sysLogResult.setVersion("mall4j.v230424");
        sysLogResult.setCode("00000");
        return sysLogResult;
    }


}
